// package com.xhh.nphm.framework.config;
//
// import com.baomidou.mybatisplus.annotation.DbType;
// import com.baomidou.mybatisplus.core.incrementer.IKeyGenerator;
// import com.baomidou.mybatisplus.extension.incrementer.H2KeyGenerator;
// import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
// import org.springframework.context.annotation.Bean;
// import org.springframework.context.annotation.Configuration;
//
// /**
// * WITH selectTemp AS (SELECT TOP 100 PERCENT ROW_NUMBER() OVER (ORDER BY pkid DESC) as __row_number__, pkid,deptno,deptname,kldgquestion,kldganswer,openflag,limittime,sortbn,inputname,isdel FROM kKnowledge ORDER BY pkid DESC) SELECT * FROM selectTemp WHERE __row_number__ BETWEEN 1 AND 10 ORDER BY __row_number__
// * SELECT pkid,deptno,deptname,kldgquestion,kldganswer,openflag,limittime,sortbn,inputname,isdel FROM kKnowledge ORDER BY pkid DESC OFFSET ? ROWS FETCH NEXT ? ROWS ONLY
// */
// @Configuration
// public class MybatisPlusConfig {
//    /**
//     * 注入主键生成器
//     */
//    @Bean
//    public IKeyGenerator keyGenerator() {
//        return new H2KeyGenerator();
//    }
//    @Bean
//    public PaginationInterceptor paginationInterceptor() {
//        PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
//        //sqlServer2012及以上版本
//        paginationInterceptor.setDbType(DbType.SQL_SERVER);
//        return paginationInterceptor;
//    }
// }
